/*
 * CommandHelper.h
 *
 *  Created on: Apr 30, 2012
 *      Author: Steven Chang <schang@cs.umn.edu>
 */

#ifndef COMMANDHELPER_H_
#define COMMANDHELPER_H_

#include <tr1/memory>
#include <string>
#include <vector>
#include <stdexcept>
#include "Course.h"
#include "TranscriptFactory.h"

using namespace std;

class CommandHelper {
public:
    enum ClassType{
        UNKNOWN=0,
        OUTOFDEPARTMENT=1,
        THEORY=2,
        THEORY_FOUNDATIONS=3,
        ARCHITECTUR_SYS_SOFTWARE=4,
        APPLICATION=5,
        COLLOQUIUM=6,
        CSCI8000=7,
        THESIS=8,
        PROJECT=9
    };

    static const char *DegreeProgramFormStatus[];

    static const char *Plan[];

    static const vector<string> ClassTypeNames;

    static const vector<string> Theory;

    static const vector<string> TheoryFoundation;

    static const vector<string> ASS;

    static const vector<string> Application;

    static const string Colloquium;

    static const string Thesis;

    static const string Project;

public:
    static const string getName(std::vector<std::string> nameVector) throw(length_error);
    static tr1::shared_ptr<TranscriptParser> getStudent(const string param) throw(out_of_range);
    static bool checkExpire(tr1::shared_ptr<TranscriptParser> student, Course &crs);
    static bool inDepartment(Course &crs);
    static bool gpaEligible(tr1::shared_ptr<TranscriptParser> student, Course &crs);
    static ClassType getType(Course &crs);

};

#endif /* COMMANDHELPER_H_ */
